import React, { useState } from 'react';
import { Select } from 'antd';
import { useAnalysisStore } from '@/stores/analysisStore';
import styles from './index.module.less';

const { Option } = Select;

const themeOptions = [
  { label: '默认主题', value: 'default' },
  { label: '暗色主题', value: 'dark' },
  { label: '亮色主题', value: 'light' },
  { label: '自定义主题', value: 'custom' },
];

const DownloadFiles: React.FC = () => {
  const [selectedTheme, setSelectedTheme] = useState('default');
  const { setAnalysisResult, analysisResult } = useAnalysisStore();

  const handleThemeChange = (value: string) => {
    setSelectedTheme(value);
    if (analysisResult) {
      setAnalysisResult({
        ...analysisResult,
        theme: value
      });
    }
  };

  return (
    <div className={styles.container}>
      <div className={styles.themeSelector}>
        <span className={styles.label}>选择主题样式：</span>
        <Select
          value={selectedTheme}
          onChange={handleThemeChange}
          style={{ width: 200 }}
        >
          {themeOptions.map(option => (
            <Option key={option.value} value={option.value}>
              {option.label}
            </Option>
          ))}
        </Select>
      </div>
    </div>
  );
};

export default DownloadFiles; 